#include <iostream>
#include <vector>

#include <math.h>
int pot(int b,int e);

using namespace std;
int main ()
{
		
	 
	
int cantCifrasRestantes = 0 ;
	
	
  vector<int> myvector;
  for (int i=1; i<=100000; i++){
	  int n = i;
  
		cantCifrasRestantes = static_cast<int>(log10(i) + 1);
		
		while(cantCifrasRestantes > 0)
		{
		myvector.push_back(n / (pot(10,cantCifrasRestantes-1)));
		n = n % (pot(10,cantCifrasRestantes-1));
		cantCifrasRestantes --;
		}

  }





vector<int>::iterator it;


cout << endl <<"res"<< myvector[0] *myvector[9] *myvector[99] *myvector[999] * myvector[9999] *myvector[99999] << endl;

  return 0;
}


int pot(int b,int e){
	int res = 1;
	for (int i = 0;i<e;i++)
	{
		res = res * b;
	}
	return res;
	
}